<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class User_model extends CI_Model {

	function __construct()
	{
		parent::__construct();
    }

	function getDataLogin($username)
	{
	    $query = "SELECT * FROM view_user WHERE USERNAME='$username' AND SUB_SYSTEM='SIRAK'";

        $query = $this->db->query($query);

        return $query;
	}

    function getViewKontrolData($kodeProdi)
    {
      $query = "SELECT * FROM view_kontrol WHERE KODE_PRODI =".$kodeProdi;
      $query = $this->db->query($query);

      if($query->num_rows()>0){
        $data = $query->row();
        return $data;
      }
      else
        return FALSE;
    }
    
}

